﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using TMDT_Nhom1A.DTO;
namespace TMDT_Nhom1A.DAO
{
    public class Brand_DAO
    {
        private static QL_DoanhNghiepDataContext data = new QL_DoanhNghiepDataContext();

        public static List<BRAND> ListBrand()
        {
            List<BRAND> listbrand = new List<BRAND>();
            var list = from b in data.BRANDs
                       select new
                       {
                           b.Brand_ID,
                           b.Brand_Name,
                           b.Description,
                       };
            foreach (var item in list)
            {
                BRAND b = new BRAND();
                b.Brand_ID = item.Brand_ID;
                b.Brand_Name = item.Brand_Name;
                b.Description = item.Description;
                listbrand.Add(b);
            }
            return listbrand;
        }
    }
}
